Server-side help.
authorrobertl <robertl>
Mon, 2 Nov 2009 20:38:02 +0000 (20:38 +0000)
committerrobertl <robertl>
Mon, 2 Nov 2009 20:38:02 +0000 (20:38 +0000)
Improve track split.
Implement 'nuke types' in misc filters.

25 files changed:
gui/README.contrib
gui/README.gui
gui/aboutui.ui
gui/advdlg.cpp
gui/advdlg.h
gui/advui.ui
gui/app.rc
gui/filterdata.cpp
gui/filterdata.h
gui/filterwidgets.cpp
gui/filterwidgets.h
gui/format.cpp
gui/format.h
gui/formatload.cpp
gui/gmapdlg.cpp
gui/gmapdlg.h
gui/gmapui.ui
gui/help.cpp
gui/help.h
gui/mainwindow.cpp
gui/miscfltui.ui
gui/optionsdlg.cpp
gui/optionsdlg.h
gui/setup.iss
gui/trackui.ui

index 9e4da0e070941f439dddf95a4050f4228135187c..6e447a29d06a2be7bbfc5ab0dbde7e70580ac6fc 100644 (file)
-If you're interested in contributing to this program, here are some\r
-guidelines.  Mail patches to gpsbabel-code@lists.sourceforge.net for\r
-consideration and integration.\r
-\r
-Rules to Live By\r
-----------------\r
-\r
-Standards are good.   ISO C and POSIX are greatly preferred.\r
-\r
-Reuse is good, if doing so is not onerous.  For example, using the expat\r
-libraries vastly simplifies the XML parsers while increasing their\r
-robustness plus those libraries are ubiquitous.  So I consider it OK to\r
-require expat.\r
-\r
-You may find format_skeleton.c and filter_skeleton.c in the source tree\r
-to be helpful examples. Just add meat!\r
-\r
-Compilers complain for a reason.   Code shouldn't emit warnings.\r
-\r
-The entire world doesn't run <your OS here>.  I've tested this code on\r
-at least five different OSes.  If you find yourself wanting to insert\r
-compiler or OS specific magic, please resist.\r
-\r
-Coding consistency is encouraged. The reality is we have a lot of code\r
-that was written by different authors. Some code from other projects is\r
-included. We don't have immutable rules about code style (indention,\r
-curly location, whitespace rules, etc.) but we do ask that you try to\r
-match what is around any code you modify.  "When in Rome..."  \r
-\r
-If writing new code, we'd prefer a style like:\r
-\r
-       int\r
-       mumble(int whatever)\r
-       {\r
-       <tab>if (whatevever) {\r
-       <tab><tab>return blah;\r
-       <tab>}\r
-       }\r
-\r
-...but if you're submitting a new source file that you intend to\r
-maintain and are convinced that two space indents will make the world a\r
-better place, knock yourself out.  But if you need to add a line of code\r
-to the above before "return blah" and do it with spaces instead of hard\r
-tabs, that would be bad.\r
-\r
-Submitting Patches\r
-------------------\r
-\r
-If you are creating a new target you should submit patches (use \r
-"cvs diff -uN" to create patches) to the following files:\r
-* Yourcode.c and/or Yourcode.h - this is the code required to do your\r
-  conversions and any support files that your code requires.\r
-* vecs.c - an updated vecs.c file implementing your conversion code into\r
-  GPSBabel.\r
-* Makefile - an updated Makefile telling the compiler how to build and link\r
-  your conversion into GPSBabel\r
-* testo - an updated script that tests your conversion (this should produce\r
-  no output if all is good, see the current testo script for examples)\r
-* YourOutput - a sample file of code produced by your function (used in testo\r
-  and lives in a directory called "reference").\r
-* Documentation - see below.\r
-\r
-Please ensure that you are building and testing against the latest code\r
-from the top of the CVS tree and that any code you modify is the latest\r
-version from the CVS - Note: code changes sometimes occur frequently!\r
-\r
-Documentation\r
--------------\r
-\r
-HTML and text documentation are generated automatically from DocBook \r
-source located in the "xmldoc" directory.  That directory contains \r
-two subdirectories of interest: "formats" and "filters".  If your\r
-contribution adds or affects a format, you'll want to be in the "formats"\r
-directory.  Otherwise, you'll want to be in the "filters" directory.\r
-\r
-You should contribute a file called "yourname.xml", where "yourname" is the\r
-name you would give on the command-line to invoke your new format or filter.  \r
-For example, the arc filter is documented in "filters/arc.xml".\r
-\r
-This file contains a general description of your format or filter, any \r
-limitations in your support for it, and anything else the end user should \r
-know.  For file formats, links to manufacturers' websites are encouraged.  \r
-The contents of this file are not valid or even well-formed XML on their own; \r
-they are included into a larger framework.  If you know DocBook, you should \r
-ensure that the contents of this file will validate if included in a <section>.\r
-If you do not know DocBook, see the other files in this directory for examples \r
-or see http://docbook.org/tdg/en/html/docbook.html for the gory details.  Tags \r
-of interest will almost certainly include <para> for paragraphs, \r
-<ulink url="..."> for web links, and <screen format="linespecific"> for \r
-example command lines.\r
-\r
-For each option supported by your format or filter, you should also contribute\r
-a file in the "options" subdirectory called "yourname-youroption.xml", again\r
-using the names you would use on the command line to invoke your format or \r
-filter with that particular option.  For example, the "distance" option to the\r
-"arc" filter is documented in "filters/options/arc-distance.xml".  These \r
-files are similar to the general description above, and should meet the same\r
-validation requirements.\r
-\r
-As of this writing, there are two formats that violate this rule: Magellan \r
-serial and Microsoft Streets & Trips.  Because those formats have the same\r
-names as other formats, their descriptions are located in "magellan1.xml" and\r
-"msroute1.xml" respectively.  These are special cases, and you should do your\r
-best to ensure that they remain the only special cases.\r
-\r
-Note that the automated framework already includes the name and description of\r
-your format and its options as described in vecs.c and yourcode.c, so there is\r
-no need to repeat that information in your documentation.\r
-\r
-\r
-Enjoy!\r
-\r
-Robert Lipe,\r
-robertlipe@usa.net\r
+If you're interested in contributing to this program, here are some
+guidelines.  Mail patches to gpsbabel-code@lists.sourceforge.net for
+consideration and integration.
+
+Rules to Live By
+----------------
+
+Standards are good.   ISO C and POSIX are greatly preferred.
+
+Reuse is good, if doing so is not onerous.  For example, using the expat
+libraries vastly simplifies the XML parsers while increasing their
+robustness plus those libraries are ubiquitous.  So I consider it OK to
+require expat.
+
+You may find format_skeleton.c and filter_skeleton.c in the source tree
+to be helpful examples. Just add meat!
+
+Compilers complain for a reason.   Code shouldn't emit warnings.
+
+The entire world doesn't run <your OS here>.  I've tested this code on
+at least five different OSes.  If you find yourself wanting to insert
+compiler or OS specific magic, please resist.
+
+Coding consistency is encouraged. The reality is we have a lot of code
+that was written by different authors. Some code from other projects is
+included. We don't have immutable rules about code style (indention,
+curly location, whitespace rules, etc.) but we do ask that you try to
+match what is around any code you modify.  "When in Rome..."  
+
+If writing new code, we'd prefer a style like:
+
+       int
+       mumble(int whatever)
+       {
+       <tab>if (whatevever) {
+       <tab><tab>return blah;
+       <tab>}
+       }
+
+...but if you're submitting a new source file that you intend to
+maintain and are convinced that two space indents will make the world a
+better place, knock yourself out.  But if you need to add a line of code
+to the above before "return blah" and do it with spaces instead of hard
+tabs, that would be bad.
+
+Submitting Patches
+------------------
+
+If you are creating a new target you should submit patches (use 
+"cvs diff -uN" to create patches) to the following files:
+* Yourcode.c and/or Yourcode.h - this is the code required to do your
+  conversions and any support files that your code requires.
+* vecs.c - an updated vecs.c file implementing your conversion code into
+  GPSBabel.
+* Makefile - an updated Makefile telling the compiler how to build and link
+  your conversion into GPSBabel
+* testo - an updated script that tests your conversion (this should produce
+  no output if all is good, see the current testo script for examples)
+* YourOutput - a sample file of code produced by your function (used in testo
+  and lives in a directory called "reference").
+* Documentation - see below.
+
+Please ensure that you are building and testing against the latest code
+from the top of the CVS tree and that any code you modify is the latest
+version from the CVS - Note: code changes sometimes occur frequently!
+
+Documentation
+-------------
+
+HTML and text documentation are generated automatically from DocBook 
+source located in the "xmldoc" directory.  That directory contains 
+two subdirectories of interest: "formats" and "filters".  If your
+contribution adds or affects a format, you'll want to be in the "formats"
+directory.  Otherwise, you'll want to be in the "filters" directory.
+
+You should contribute a file called "yourname.xml", where "yourname" is the
+name you would give on the command-line to invoke your new format or filter.  
+For example, the arc filter is documented in "filters/arc.xml".
+
+This file contains a general description of your format or filter, any 
+limitations in your support for it, and anything else the end user should 
+know.  For file formats, links to manufacturers' websites are encouraged.  
+The contents of this file are not valid or even well-formed XML on their own; 
+they are included into a larger framework.  If you know DocBook, you should 
+ensure that the contents of this file will validate if included in a <section>.
+If you do not know DocBook, see the other files in this directory for examples 
+or see http://docbook.org/tdg/en/html/docbook.html for the gory details.  Tags 
+of interest will almost certainly include <para> for paragraphs, 
+<ulink url="..."> for web links, and <screen format="linespecific"> for 
+example command lines.
+
+For each option supported by your format or filter, you should also contribute
+a file in the "options" subdirectory called "yourname-youroption.xml", again
+using the names you would use on the command line to invoke your format or 
+filter with that particular option.  For example, the "distance" option to the
+"arc" filter is documented in "filters/options/arc-distance.xml".  These 
+files are similar to the general description above, and should meet the same
+validation requirements.
+
+As of this writing, there are two formats that violate this rule: Magellan 
+serial and Microsoft Streets & Trips.  Because those formats have the same
+names as other formats, their descriptions are located in "magellan1.xml" and
+"msroute1.xml" respectively.  These are special cases, and you should do your
+best to ensure that they remain the only special cases.
+
+Note that the automated framework already includes the name and description of
+your format and its options as described in vecs.c and yourcode.c, so there is
+no need to repeat that information in your documentation.
+
+
+Enjoy!
+
+Robert Lipe,
+robertlipe@usa.net
index 750c2da2dd7ab794766314b88477a986e8d5753c..2c285d30ed16f57d41932bfe942b9a8d16fccd5f 100644 (file)
@@ -1,5 +1,5 @@
-* Adding your own language to GPSBabelFE *\r
--------------------------------------------\r
-\r
-To be written.\r
-\r
+* Adding your own language to GPSBabelFE *
+-------------------------------------------
+
+To be written.
+
index 6d401b7d7b101d44ec915115553a97107aadddf0..b359e6f8151d318364b71158ea3b18061b220a8e 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>710</width>
-    <height>430</height>
+    <width>650</width>
+    <height>284</height>
    </rect>
   </property>
   <property name="windowTitle">
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
-      <widget class="QLabel" name="label">
-       <property name="text">
-        <string/>
-       </property>
-       <property name="pixmap">
-        <pixmap resource="app.qrc">:/images/appicon.png</pixmap>
-       </property>
-       <property name="scaledContents">
-        <bool>false</bool>
-       </property>
-      </widget>
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="0" column="0">
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="1" column="0">
+        <widget class="QLabel" name="label">
+         <property name="maximumSize">
+          <size>
+           <width>100</width>
+           <height>100</height>
+          </size>
+         </property>
+         <property name="text">
+          <string/>
+         </property>
+         <property name="pixmap">
+          <pixmap resource="app.qrc">:/images/appicon.png</pixmap>
+         </property>
+         <property name="scaledContents">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="0">
+        <spacer name="verticalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
      </item>
      <item>
       <widget class="QTextEdit" name="textEdit">
index 885e7c491b79db06d80bf181769fe248f7452c05..eecd1d346f031c6848efb77e6dd8c9c41146302e 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: advdlg.cpp,v 1.2 2009/08/28 17:08:55 robertl Exp $
+// $Id: advdlg.cpp,v 1.3 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
 //------------------------------------------------------------------------
 AdvDlg::AdvDlg(QWidget* parent,
               bool &synthShortNames,
-              bool &forceGPSTypes,
               bool &enableCharSetXform,
               bool &previewGmap,
               int  &debugLevel):
   QDialog(parent),
   synthShortNames(synthShortNames),
-  forceGPSTypes(forceGPSTypes),
   enableCharSetXform(enableCharSetXform),
   previewGmap(previewGmap),
   debugLevel(debugLevel)
 {
   ui.setupUi(this);
   ui.synthShortNames->setChecked(synthShortNames);
-  ui.forceGPSTypes->setChecked(forceGPSTypes);
   ui.enableCharSetXform->setChecked(enableCharSetXform);
   ui.previewGmap->setChecked(previewGmap);
   ui.debugCombo->setCurrentIndex(debugLevel+1);
@@ -54,7 +51,6 @@ AdvDlg::AdvDlg(QWidget* parent,
 void AdvDlg::acceptClicked()
 {
   synthShortNames = ui.synthShortNames->isChecked();
-  forceGPSTypes = ui.forceGPSTypes->isChecked();
   enableCharSetXform = ui.enableCharSetXform->isChecked();
   previewGmap = ui.previewGmap->isChecked();
   debugLevel = ui.debugCombo->currentIndex()-1;
index 9f0f951ff4ad7c3b59b54eeef2445e6cf7bfd9b9..c26821383ca33ce3bdcb71e3847604fba73f1a60 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: advdlg.h,v 1.1 2009/07/05 21:14:56 robertl Exp $
+// $Id: advdlg.h,v 1.2 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -30,7 +30,6 @@ class AdvDlg: public QDialog {
 public:
   AdvDlg(QWidget* parent, 
         bool &synthShortNames, 
-        bool &forceGPSTypes,
         bool &enableCharSetXform,
         bool &previewGmap,
         int   &debugLevel);
@@ -39,7 +38,6 @@ public:
 private:
   Ui_AdvUi ui;
   bool &synthShortNames;
-  bool &forceGPSTypes;
   bool &enableCharSetXform;
   bool &previewGmap;
   int  &debugLevel;
index 631682fa9e45f1ceec835dce75824023ad1d6bd7..11596c4f7c2b4f0eb70a176e67023ee25bed1cec 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>347</width>
-    <height>222</height>
+    <width>280</width>
+    <height>185</height>
    </rect>
   </property>
   <property name="windowTitle">
      </property>
     </widget>
    </item>
-   <item>
-    <widget class="QCheckBox" name="forceGPSTypes">
-     <property name="enabled">
-      <bool>false</bool>
-     </property>
-     <property name="text">
-      <string>Force Selected GPS data types (nuketypes filter)</string>
-     </property>
-    </widget>
-   </item>
    <item>
     <widget class="QCheckBox" name="enableCharSetXform">
      <property name="enabled">
index 78c3979f0112e7363b25c72f51bbb20e24bc5c77..5f0fddf3b5a74b56b4fdbd02a2aaaa754a1acc7f 100644 (file)
@@ -1 +1 @@
-IDI_ICON1      ICON    DISCARDABLE "images/appicon.ico"\r
+IDI_ICON1      ICON    DISCARDABLE "images/appicon.ico"
index b961f006cfc3a6cdb82078e5a072e83750e4842c..1231a3a45cea010c873e541fc48c00dab211d644 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: filterdata.cpp,v 1.3 2009/08/28 17:08:55 robertl Exp $
+// $Id: filterdata.cpp,v 1.4 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -88,27 +88,32 @@ QStringList TrackFilterData::makeOptionString()
   if (speed)    s += ",speed";
   if (pack)     s += ",pack";
   if (merge)    s += ",merge";
-  if (split && (pack || merge))  {
-    s += ",split";
-    if (splitTime > 0)
-      s += QString("=%1%2").arg(splitTime).arg("mhd"[splitTimeUnit]);
-  }
-  if (splitDist > 0) {
-    double d = splitDist;
-    char u = ' ';
-    if (splitDistUnit == 0) { // ft.
-      d /= 5280.0;  u = 'm';
-    }
-    else if (splitDistUnit == 1) { //m
-      d /= 1000.0;  u = 'k';
+  if (pack || merge) {
+    if (splitByDate)  {
+      s += ",split";
     }
-    else if (splitDistUnit == 2) { //km
-      u = 'k';
+    if (splitByTime)  {
+      s += ",split";
+      if (splitTime > 0)
+       s += QString("=%1%2").arg(splitTime).arg("mhd"[splitTimeUnit]);
     }
-    else if (splitDistUnit == 3) { //m
-      u = 'm';
+    if (splitByDistance && splitDist > 0) {
+      double d = splitDist;
+      char u = ' ';
+      if (splitDistUnit == 0) { // ft.
+       d /= 5280.0;  u = 'm';
+      }
+      else if (splitDistUnit == 1) { //m
+       d /= 1000.0;  u = 'k';
+      }
+      else if (splitDistUnit == 2) { //km
+       u = 'k';
+      }
+      else if (splitDistUnit == 3) { //m
+       u = 'm';
+      }
+      s += QString(",sdistance=%1%2").arg(d).arg(u);
     }
-    s += QString(",sdistance=%1%2").arg(d).arg(u);
   }
 
   if (start)    s += QString(",start=%1").arg(optionDate(startTime, TZ));
@@ -142,6 +147,15 @@ QStringList MiscFltFilterData::makeOptionString()
   if (!inUse)
     return args;
 
+  if (nukeRoutes || nukeTracks || nukeWaypoints) {
+    args << QString("-x");
+    QString s = "nuketypes";
+    if (nukeRoutes) s += ",routes";
+    if (nukeTracks) s += ",tracks";
+    if (nukeWaypoints) s += ",waypoints";
+    args << s;
+  }
+
   if (swap) args << "-x" << "swap";
 
   if (transform) {
index 8946e386fbc142c56ecbd4f42cfb581080f9b736..a6bc3d1951a8fc04ac730f69f75e49bfb1b415eb 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: filterdata.h,v 1.3 2009/09/02 19:05:27 robertl Exp $
+// $Id: filterdata.h,v 1.4 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -62,6 +62,9 @@ class TrackFilterData: public FilterData  {
                     stop(false),
                     pack(false), merge(false), split(false), 
                     GPSFixes(false), GPSFixesVal(0),
+                    splitByDate(false),
+                    splitByTime(false),
+                    splitByDistance(false),
                     course(false), speed(false),
                     splitTime(0), splitTimeUnit(0),
                     splitDist(0), splitDistUnit(0)
@@ -82,6 +85,9 @@ class TrackFilterData: public FilterData  {
     sg.addVarSetting(new BoolSetting("trks.pack", pack));
     sg.addVarSetting(new BoolSetting("trks.merge", merge));
     sg.addVarSetting(new BoolSetting("trks.split", split));
+    sg.addVarSetting(new BoolSetting("trks.splitByDate", splitByDate));
+    sg.addVarSetting(new BoolSetting("trks.splitByTime", splitByTime));
+    sg.addVarSetting(new BoolSetting("trks.splitByDistance", splitByDistance));
     sg.addVarSetting(new BoolSetting("trks.start", start));
     sg.addVarSetting(new DateTimeSetting("trks.startTime", startTime));
     sg.addVarSetting(new BoolSetting("trks.stop", stop));
@@ -114,6 +120,7 @@ class TrackFilterData: public FilterData  {
   QDateTime stopTime;
   bool pack, merge, split, GPSFixes;
   int  GPSFixesVal;
+  bool splitByDate, splitByTime, splitByDistance;
   bool course, speed;
   int  splitTime, splitTimeUnit;
   int  splitDist, splitDistUnit;
@@ -186,6 +193,9 @@ class RtTrkFilterData: public FilterData  {
 class MiscFltFilterData: public FilterData  {
  public:
   MiscFltFilterData(): FilterData(), 
+                      nukeRoutes(false),
+                      nukeTracks(false),
+                      nukeWaypoints(false),
                       transform(false),
                       del(false),
                       swap(false),
@@ -196,6 +206,9 @@ class MiscFltFilterData: public FilterData  {
   virtual QStringList makeOptionString();
   virtual void makeSettingGroup(SettingGroup &sg)
   {
+    sg.addVarSetting(new BoolSetting("mscflt.nukeRoutes", nukeRoutes));
+    sg.addVarSetting(new BoolSetting("mscflt.nukeTracks", nukeTracks));
+    sg.addVarSetting(new BoolSetting("mscflt.nukeWaypoints", nukeWaypoints));
     sg.addVarSetting(new BoolSetting("mscflt.inUse", inUse));
     sg.addVarSetting(new BoolSetting("mscflt.transform", transform));
     sg.addVarSetting(new IntSetting("mscflt.transformVal", transformVal));
@@ -204,6 +217,7 @@ class MiscFltFilterData: public FilterData  {
   }
 
  public:
+  bool nukeRoutes, nukeTracks, nukeWaypoints;
   bool transform, del, swap;
   int transformVal;
 };
index eddae41541c1695d9d603f27312e7ebdc03573a3..cd17b8c3208d02370d0511e902b5cf2463f31f11 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: filterwidgets.cpp,v 1.4 2009/09/14 14:25:14 robertl Exp $
+// $Id: filterwidgets.cpp,v 1.5 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -40,11 +40,23 @@ TrackWidget::TrackWidget(QWidget *parent, TrackFilterData &tfd): FilterWidget(pa
   addCheckEnabler(ui.stopCheck,     ui.stopEdit);
   addCheckEnabler(ui.GPSFixesCheck, ui.GPSFixesCombo);
 
+  addCheckEnabler(ui.splitTimeCheck, 
+                 (QList<QWidget *> ()
+                  <<ui.splitTimeSpin
+                  <<ui.splitTimeCombo));
+  addCheckEnabler(ui.splitDistanceCheck, 
+                 (QList<QWidget *> ()
+                  <<ui.splitDistSpin
+                  <<ui.splitDistCombo));
+
   connect(ui.mergeCheck, SIGNAL(clicked()) , this, SLOT(mergeCheckX()));
-  connect(ui.splitCheck, SIGNAL(clicked()) , this, SLOT(OtherCheckX()));
   connect(ui.packCheck,  SIGNAL(clicked()),  this, SLOT(packCheckX()));
-  connect(ui.startCheck, SIGNAL(clicked()),  this, SLOT(OtherCheckX()));
-  connect(ui.stopCheck,   SIGNAL(clicked()), this, SLOT(OtherCheckX()));
+  connect(ui.startCheck, SIGNAL(clicked()),  this, SLOT(otherCheckX()));
+  connect(ui.stopCheck,   SIGNAL(clicked()), this, SLOT(otherCheckX()));
+
+  connect(ui.splitDateCheck,   SIGNAL(clicked()), this, SLOT(splitDateX()));
+  connect(ui.splitTimeCheck,   SIGNAL(clicked()), this, SLOT(splitTimeX()));
+  connect(ui.splitDistanceCheck,   SIGNAL(clicked()), this, SLOT(splitDistanceX()));
 
   ui.startEdit->setDisplayFormat("dd MMM yyyy hh:mm:ss AP");
   ui.stopEdit->setDisplayFormat("dd MMM yyyy hh:mm:ss AP");
@@ -57,7 +69,9 @@ TrackWidget::TrackWidget(QWidget *parent, TrackFilterData &tfd): FilterWidget(pa
   fopts << new BoolFilterOption(tfd.stop,   ui.stopCheck);
   fopts << new BoolFilterOption(tfd.pack,   ui.packCheck);
   fopts << new BoolFilterOption(tfd.merge,  ui.mergeCheck);
-  fopts << new BoolFilterOption(tfd.split,  ui.splitCheck);
+  fopts << new BoolFilterOption(tfd.splitByDate,  ui.splitDateCheck);
+  fopts << new BoolFilterOption(tfd.splitByTime,  ui.splitTimeCheck);
+  fopts << new BoolFilterOption(tfd.splitByDistance,  ui.splitDistanceCheck);
   fopts << new BoolFilterOption(tfd.GPSFixes,  ui.GPSFixesCheck);
   fopts << new BoolFilterOption(tfd.course, ui.courseCheck);
   fopts << new BoolFilterOption(tfd.speed,  ui.speedCheck);
@@ -81,17 +95,19 @@ TrackWidget::TrackWidget(QWidget *parent, TrackFilterData &tfd): FilterWidget(pa
 }
 
 //------------------------------------------------------------------------
-void TrackWidget::OtherCheckX()
+void TrackWidget::otherCheckX()
 {
   ui.TZCheck->setEnabled(ui.stopCheck->isChecked() || ui.startCheck->isChecked());
-  ui.splitCheck->setEnabled(ui.mergeCheck->isChecked() || ui.packCheck->isChecked());
-  bool bb = ui.packCheck->isChecked() && ui.splitCheck->isChecked();
-  ui.splitTimeSpin->setEnabled(bb);
-  ui.splitTimeCombo->setEnabled(bb);
-
-  bb = ui.packCheck->isChecked();
-  ui.splitDistSpin->setEnabled(bb);
-  ui.splitDistCombo->setEnabled(bb);
+
+  ui.splitTimeSpin->setEnabled(ui.splitTimeCheck->isChecked());
+  ui.splitTimeCombo->setEnabled(ui.splitTimeCheck->isChecked());
+  ui.splitDistSpin->setEnabled(ui.splitDistanceCheck->isChecked());
+  ui.splitDistCombo->setEnabled(ui.splitDistanceCheck->isChecked());
+  
+  bool bb = (ui.mergeCheck->isChecked() || ui.packCheck->isChecked());
+  ui.splitDateCheck->setEnabled(bb);
+  ui.splitTimeCheck->setEnabled(bb);
+  ui.splitDistanceCheck->setEnabled(bb);
 }
 
 //------------------------------------------------------------------------
@@ -99,17 +115,45 @@ void TrackWidget::mergeCheckX()
 {
   if (ui.mergeCheck->isChecked())
     ui.packCheck->setChecked(false);
-  OtherCheckX();
+  otherCheckX();
 }
 //------------------------------------------------------------------------
-
 void TrackWidget::packCheckX()
 {
   if (ui.packCheck->isChecked())
     ui.mergeCheck->setChecked(false);
-  OtherCheckX();
+  otherCheckX();
 }
 
+//------------------------------------------------------------------------
+void TrackWidget::splitDateX()
+{
+  if (ui.splitDateCheck->isChecked()) {
+    ui.splitTimeCheck->setChecked(false);
+    ui.splitDistanceCheck->setChecked(false);
+  }
+  otherCheckX();
+}
+//------------------------------------------------------------------------
+void TrackWidget::splitTimeX()
+{
+  if (ui.splitTimeCheck->isChecked()) {
+    ui.splitDateCheck->setChecked(false);
+    ui.splitDistanceCheck->setChecked(false);
+  }
+  otherCheckX();
+}
+//------------------------------------------------------------------------
+void TrackWidget::splitDistanceX()
+{
+  if (ui.splitDistanceCheck->isChecked()) {
+    ui.splitDateCheck->setChecked(false);
+    ui.splitTimeCheck->setChecked(false);
+  }
+  otherCheckX();
+}
+
+
 //------------------------------------------------------------------------
 //------------------------------------------------------------------------
 WayPtsWidget::WayPtsWidget(QWidget *parent, WayPtsFilterData &wfd): FilterWidget(parent) , wfd(wfd)
@@ -186,6 +230,9 @@ MiscFltWidget::MiscFltWidget(QWidget *parent, MiscFltFilterData &mfd): FilterWid
   fopts << new BoolFilterOption(mfd.transform, ui.transformCheck);
   fopts << new BoolFilterOption(mfd.swap, ui.swapCheck);
   fopts << new BoolFilterOption(mfd.del, ui.deleteCheck);
+  fopts << new BoolFilterOption(mfd.nukeTracks, ui.nukeTracks);
+  fopts << new BoolFilterOption(mfd.nukeRoutes, ui.nukeRoutes);
+  fopts << new BoolFilterOption(mfd.nukeWaypoints, ui.nukeWaypoints);
   fopts << new ComboFilterOption(mfd.transformVal,  ui.transformCombo);
 
   setWidgetValues();
index ee5779fb5e8c1c28afb7e5aeb778338cf53a5418..34b2f9de783e011fdfd421b0d1de695e12b244a9 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: filterwidgets.h,v 1.1 2009/07/05 21:14:56 robertl Exp $
+// $Id: filterwidgets.h,v 1.2 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -37,14 +37,14 @@ class CheckEnabler: public QObject
 {
   Q_OBJECT
     public:
-  CheckEnabler(QObject *parent, QCheckBox *ck, QWidget *w): QObject(parent), checkBox(ck)
+  CheckEnabler(QObject *parent, QAbstractButton *ck, QWidget *w): QObject(parent), checkBox(ck)
   {
     widgetList << w;
     connect(ck, SIGNAL(clicked()), this, SLOT(checkStatusChanged()));
     checkStatusChanged();
     fixWhatsThis();
   }
-  CheckEnabler(QObject *parent, QCheckBox *ck, QList<QWidget *> &wl): 
+  CheckEnabler(QObject *parent, QAbstractButton *ck, QList<QWidget *> &wl): 
     QObject(parent), checkBox(ck)
   {
     widgetList = wl;
@@ -63,7 +63,7 @@ public slots:
   }
   
 private:
-  QCheckBox *checkBox;
+  QAbstractButton *checkBox;
   QList<QWidget*> widgetList;
   void fixWhatsThis()
   {
@@ -101,7 +101,7 @@ class FilterOption
 class BoolFilterOption: public FilterOption
 {
  public:
- BoolFilterOption(bool &b, QCheckBox *ck): FilterOption(), b(b), checkBox(ck)
+ BoolFilterOption(bool &b, QAbstractButton *ck): FilterOption(), b(b), checkBox(ck)
   {
   }
   void setWidgetValue() {checkBox->setChecked(b); }
@@ -109,7 +109,7 @@ class BoolFilterOption: public FilterOption
     
  private:
   bool &b;
-  QCheckBox *checkBox;
+  QAbstractButton *checkBox;
 };
 
 //------------------------------------------------------------------------
@@ -224,10 +224,10 @@ public:
     for (int i=0; i<fopts.size(); i++)
       fopts[i]->setWidgetValue();
   }
-  void addCheckEnabler(QCheckBox *ck, QWidget *w) {
+  void addCheckEnabler(QAbstractButton *ck, QWidget *w) {
     enbls << new CheckEnabler(this, ck, w);
   }
-  void addCheckEnabler(QCheckBox *ck, QList<QWidget *> &wl)
+  void addCheckEnabler(QAbstractButton *ck, QList<QWidget *> &wl)
   {
     enbls << new CheckEnabler(this, ck, wl);
   }
@@ -250,7 +250,7 @@ Q_OBJECT
   TrackWidget(QWidget *parent, TrackFilterData &tf);
 
   virtual void checkChecks(){
-    OtherCheckX();
+    otherCheckX();
     FilterWidget::checkChecks();
   }
 
@@ -260,7 +260,10 @@ Q_OBJECT
 
   private slots:
   void mergeCheckX();
-  void OtherCheckX();
+  void otherCheckX();
+  void splitDateX();
+  void splitTimeX();
+  void splitDistanceX();
   void packCheckX();
 };
 
index c6b3a1c99fedbc305102aeecce80bf8263f387ca..15556669938125462d7d54d45efde728397dc48f 100644 (file)
@@ -1,69 +1,71 @@
-// -*- C++ -*-\r
-// $Id: format.cpp,v 1.1 2009/07/05 21:14:56 robertl Exp $\r
-//------------------------------------------------------------------------\r
-//\r
-//  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.\r
-//\r
-//  This program is free software; you can redistribute it and/or\r
-//  modify it under the terms of the GNU General Public License as\r
-//  published by the Free Software Foundation; either version 2 of the\r
-//  License, or (at your option) any later version.\r
-//\r
-//  This program is distributed in the hope that it will be useful,\r
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-//  General Public License for more details.\r
-//\r
-//  You should have received a copy of the GNU General Public License\r
-//  along with this program; if not, write to the Free Software\r
-//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111\r
-//  USA\r
-//\r
-//------------------------------------------------------------------------\r
-#include "format.h"\r
-\r
-static void saveOptions(QSettings &settings, const QString &prefix, const QList<FormatOption> &options) {\r
-  for (int i=0; i<options.size(); i++) {\r
-    QString kp = prefix + "." + options[i].getName();\r
-    QString k1 = kp + ".selected";\r
-    QString k2 = kp + ".value";\r
-    settings.setValue(k1, options[i].getSelected());\r
-    settings.setValue(k2, options[i].getValue());\r
-  }\r
-}\r
-\r
-static void restoreOptions(QSettings &settings, const QString&prefix, QList<FormatOption> &options) {\r
-  for (int i=0; i<options.size(); i++) {\r
-    QString kp = prefix + "." + options[i].getName();\r
-    QString k1 = kp + ".selected";\r
-    QString k2 = kp + ".value";\r
-    if (settings.contains(k1) && settings.contains(k2)) {\r
-      options[i].setSelected(settings.value(k1).toBool());\r
-      options[i].setValue(settings.value(k2));\r
-    }\r
-  }\r
-}\r
-\r
-void Format::saveSettings(QSettings &settings)\r
-{\r
-  saveOptions(settings, name+".input", inputOptions);\r
-  saveOptions(settings, name+".output", outputOptions);\r
-}\r
-\r
-void Format::restoreSettings(QSettings &settings)\r
-{\r
-  restoreOptions(settings, name+".input", inputOptions);\r
-  restoreOptions(settings, name+".output", outputOptions);\r
-}\r
-\r
-void Format::setToDefault()\r
-{\r
-  for (int i=0; i<inputOptions.size(); i++) {\r
-    inputOptions[i].setSelected(false);\r
-    inputOptions[i].setValue(QVariant());\r
-  }\r
-  for (int i=0; i<outputOptions.size(); i++) {\r
-    outputOptions[i].setSelected(false);\r
-    outputOptions[i].setValue(QVariant());\r
-  }\r
-}\r
+// -*- C++ -*-
+// $Id: format.cpp,v 1.2 2009/11/02 20:38:02 robertl Exp $
+//------------------------------------------------------------------------
+//
+//  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
+//
+//  This program is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU General Public License as
+//  published by the Free Software Foundation; either version 2 of the
+//  License, or (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111
+//  USA
+//
+//------------------------------------------------------------------------
+#include "format.h"
+
+QString Format::htmlBase = QString();
+
+static void saveOptions(QSettings &settings, const QString &prefix, const QList<FormatOption> &options) {
+  for (int i=0; i<options.size(); i++) {
+    QString kp = prefix + "." + options[i].getName();
+    QString k1 = kp + ".selected";
+    QString k2 = kp + ".value";
+    settings.setValue(k1, options[i].getSelected());
+    settings.setValue(k2, options[i].getValue());
+  }
+}
+
+static void restoreOptions(QSettings &settings, const QString&prefix, QList<FormatOption> &options) {
+  for (int i=0; i<options.size(); i++) {
+    QString kp = prefix + "." + options[i].getName();
+    QString k1 = kp + ".selected";
+    QString k2 = kp + ".value";
+    if (settings.contains(k1) && settings.contains(k2)) {
+      options[i].setSelected(settings.value(k1).toBool());
+      options[i].setValue(settings.value(k2));
+    }
+  }
+}
+
+void Format::saveSettings(QSettings &settings)
+{
+  saveOptions(settings, name+".input", inputOptions);
+  saveOptions(settings, name+".output", outputOptions);
+}
+
+void Format::restoreSettings(QSettings &settings)
+{
+  restoreOptions(settings, name+".input", inputOptions);
+  restoreOptions(settings, name+".output", outputOptions);
+}
+
+void Format::setToDefault()
+{
+  for (int i=0; i<inputOptions.size(); i++) {
+    inputOptions[i].setSelected(false);
+    inputOptions[i].setValue(QVariant());
+  }
+  for (int i=0; i<outputOptions.size(); i++) {
+    outputOptions[i].setSelected(false);
+    outputOptions[i].setValue(QVariant());
+  }
+}
index 6c86e3e1e8ae9df59aeedce26f19118d3c95577f..e3bb00e61fab485e871c2cd8a62acbf486c2d054 100644 (file)
-// -*- C++ -*-\r
-// $Id: format.h,v 1.1 2009/07/05 21:14:56 robertl Exp $\r
-//------------------------------------------------------------------------\r
-//\r
-//  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.\r
-//\r
-//  This program is free software; you can redistribute it and/or\r
-//  modify it under the terms of the GNU General Public License as\r
-//  published by the Free Software Foundation; either version 2 of the\r
-//  License, or (at your option) any later version.\r
-//\r
-//  This program is distributed in the hope that it will be useful,\r
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-//  General Public License for more details.\r
-//\r
-//  You should have received a copy of the GNU General Public License\r
-//  along with this program; if not, write to the Free Software\r
-//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111\r
-//  USA\r
-//\r
-//------------------------------------------------------------------------\r
-#ifndef FORMAT_H\r
-#define FORMAT_H\r
-\r
-#include <QString>\r
-#include <QVariant>\r
-#include <QStringList>\r
-#include <QSettings>\r
-\r
-class FormatOption\r
-{\r
-public:\r
-  typedef enum {\r
-    OPTstring,\r
-    OPTbool,\r
-    OPTint,\r
-    OPTboundedInt,\r
-    OPTfloat,\r
-    OPTinFile,\r
-    OPToutFile,\r
-  } optionType;\r
-  \r
-  FormatOption(): name(QString()), description(QString()), type(OPTbool), \r
-                 defaultValue(QVariant()), \r
-                 minValue(QVariant()), maxValue(QVariant()), \r
-                 html(QString()), value(QVariant()), selected(false)\r
-  {\r
-  }\r
-  FormatOption(const QString &name, \r
-              const QString &description,\r
-              optionType type,\r
-              QVariant defaultValue = QVariant(),\r
-              QVariant minValue = QVariant(),\r
-              QVariant maxValue = QVariant(),\r
-              QString html = QString()\r
-              ): name(name), description(description), type(type),\r
-                 defaultValue(defaultValue), minValue(minValue), maxValue(maxValue), html(html)\r
-  {\r
-    value = QVariant();\r
-    selected = false;\r
-  }\r
-  FormatOption(const FormatOption & c)\r
-    : name(c.name), description(c.description), type(c.type),\r
-      defaultValue(c.defaultValue), minValue(c.minValue), maxValue(c.maxValue), html(c.html),\r
-      value(c.value), selected(c.selected)\r
-  {\r
-  }\r
-  \r
-  QString  getName() const {return name; }\r
-  QString  getDescription() const {return description; }\r
-  optionType getType() const {return type; }\r
-  QVariant getValue() const    { return value; }\r
-  bool     getSelected() const {return selected; }\r
-  QVariant getMinValue() const {return minValue; }\r
-  QVariant getMaxValue() const {return maxValue; }\r
-  QVariant getDefaultValue() const {return defaultValue; }\r
-\r
-  void setValue(QVariant v) { value = v; };\r
-  void setSelected(bool v)  { selected = v; };\r
-\r
-private:\r
-  QString name;\r
-  QString description;\r
-  optionType type;\r
-  QVariant defaultValue;\r
-  QVariant minValue;\r
-  QVariant maxValue;\r
-  QString  html;\r
-  QVariant value;\r
-  bool     selected;\r
-};\r
-\r
-\r
-//------------------------------------------------------------------------\r
-class Format \r
-{\r
- public:\r
-  Format():name(QString()),\r
-          description(QString()),\r
-          readWaypoints(false),\r
-          readTracks(false),\r
-          readRoutes(false),\r
-          writeWaypoints(false),\r
-          writeTracks(false),\r
-          writeRoutes(false),\r
-          fileFormat(false),\r
-          deviceFormat(false),\r
-          extensions(QStringList()) \r
-  {\r
-    inputOptions.clear();\r
-    outputOptions.clear();\r
-  };\r
-\r
-  Format(const QString &name,\r
-        const QString &description,\r
-        bool readWaypoints, bool readTracks, bool readRoutes,\r
-        bool writeWaypoints, bool writeTracks, bool writeRoutes,\r
-        bool fileFormat, bool deviceFormat,\r
-        const QStringList &extensions,\r
-        QList<FormatOption> &inputOptions, \r
-        QList<FormatOption> &outputOptions):\r
-    name(name), description(description),\r
-    readWaypoints(readWaypoints), readTracks(readTracks), readRoutes(readRoutes),\r
-    writeWaypoints(writeWaypoints), writeTracks(writeTracks), writeRoutes(writeRoutes),\r
-    fileFormat(fileFormat), deviceFormat(deviceFormat),\r
-    extensions(extensions),\r
-    inputOptions(inputOptions),\r
-    outputOptions(outputOptions)\r
-  {\r
-  }\r
-\r
-  Format(const Format &c):\r
-    name(c.name), description(c.description),\r
-    readWaypoints(c.readWaypoints), readTracks(c.readTracks), readRoutes(c.readRoutes),\r
-    writeWaypoints(c.writeWaypoints), writeTracks(c.writeTracks), writeRoutes(c.writeRoutes),\r
-    fileFormat(c.fileFormat), deviceFormat(c.deviceFormat),\r
-    extensions(c.extensions),\r
-    inputOptions(c.inputOptions),\r
-    outputOptions(c.outputOptions)\r
-  {\r
-  }\r
-\r
-  ~Format() {};\r
-\r
-  bool isReadWaypoints() const { return readWaypoints; };\r
-  bool isReadTracks() const    { return readTracks; };\r
-  bool isReadRoutes() const    { return readRoutes; };\r
-  bool isReadSomething() const { \r
-    return isReadWaypoints() || isReadTracks () || isReadRoutes(); \r
-  };\r
-\r
-  bool isWriteWaypoints() const { return writeWaypoints; };\r
-  bool isWriteTracks() const    { return writeTracks; };\r
-  bool isWriteRoutes() const    { return writeRoutes; };\r
-  bool isWriteSomething() const { \r
-    return isWriteWaypoints() || isWriteTracks () || isWriteRoutes(); \r
-  };\r
-\r
-  QString getName() const           { return name; };\r
-  QString getDescription() const    { return description; };\r
-  QStringList getExtensions() const { return extensions; };\r
-  const QList<FormatOption> &getInputOptions()  const { return inputOptions; };\r
-  const QList<FormatOption> &getOutputOptions() const { return outputOptions; };\r
-\r
-  QList<FormatOption> *getInputOptionsRef()  { return &inputOptions; };\r
-  QList<FormatOption> *getOutputOptionsRef() { return &outputOptions; };\r
-\r
-  bool isDeviceFormat() const { return deviceFormat; };\r
-  bool isFileFormat() const { return   fileFormat; };\r
-  \r
-  void saveSettings(QSettings &settings);\r
-  void restoreSettings(QSettings &settings);\r
-  void setToDefault();\r
-\r
- private:\r
-  QString name, description;\r
-  bool readWaypoints, readTracks, readRoutes;\r
-  bool writeWaypoints, writeTracks, writeRoutes;\r
-  bool fileFormat, deviceFormat;\r
-  QStringList extensions;\r
-  QList<FormatOption>inputOptions;\r
-  QList<FormatOption>outputOptions;\r
-  \r
-};\r
-\r
-#endif\r
+// -*- C++ -*-
+// $Id: format.h,v 1.2 2009/11/02 20:38:02 robertl Exp $
+//------------------------------------------------------------------------
+//
+//  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
+//
+//  This program is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU General Public License as
+//  published by the Free Software Foundation; either version 2 of the
+//  License, or (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111
+//  USA
+//
+//------------------------------------------------------------------------
+#ifndef FORMAT_H
+#define FORMAT_H
+
+#include <QString>
+#include <QVariant>
+#include <QStringList>
+#include <QSettings>
+
+class FormatOption
+{
+public:
+  typedef enum {
+    OPTstring,
+    OPTbool,
+    OPTint,
+    OPTboundedInt,
+    OPTfloat,
+    OPTinFile,
+    OPToutFile,
+  } optionType;
+  
+  FormatOption(): name(QString()), description(QString()), type(OPTbool), 
+                 defaultValue(QVariant()), 
+                 minValue(QVariant()), maxValue(QVariant()), 
+                 html(QString()), value(QVariant()), selected(false)
+  {
+  }
+  FormatOption(const QString &name, 
+              const QString &description,
+              optionType type,
+              QVariant defaultValue = QVariant(),
+              QVariant minValue = QVariant(),
+              QVariant maxValue = QVariant(),
+              QString html = QString()
+              ): name(name), description(description), type(type),
+                 defaultValue(defaultValue), minValue(minValue), maxValue(maxValue), html(html)
+  {
+    value = QVariant();
+    selected = false;
+  }
+
+  FormatOption(const FormatOption & c)
+    : name(c.name), description(c.description), type(c.type),
+      defaultValue(c.defaultValue), minValue(c.minValue), maxValue(c.maxValue), html(c.html),
+      value(c.value), selected(c.selected)
+  {
+  }
+  
+  QString  getName() const {return name; }
+  QString  getDescription() const {return description; }
+  optionType getType() const {return type; }
+  QVariant getValue() const    { return value; }
+  bool     getSelected() const {return selected; }
+  QVariant getMinValue() const {return minValue; }
+  QVariant getMaxValue() const {return maxValue; }
+  QVariant getDefaultValue() const {return defaultValue; }
+
+  void setValue(QVariant v) { value = v; };
+  void setSelected(bool v)  { selected = v; }; 
+  QString getHtml() const { return html; };
+
+private:
+  QString name;
+  QString description;
+  optionType type;
+  QVariant defaultValue;
+  QVariant minValue;
+  QVariant maxValue;
+  QString  html;
+  QVariant value;
+  bool     selected;
+};
+
+
+//------------------------------------------------------------------------
+class Format 
+{
+ public:
+  Format():name(QString()),
+          description(QString()),
+          readWaypoints(false),
+          readTracks(false),
+          readRoutes(false),
+          writeWaypoints(false),
+          writeTracks(false),
+          writeRoutes(false),
+          fileFormat(false),
+          deviceFormat(false),
+          extensions(QStringList()),
+           html(QString())
+  {
+    inputOptions.clear();
+    outputOptions.clear();
+  };
+
+  Format(const QString &name,
+        const QString &description,
+        bool readWaypoints, bool readTracks, bool readRoutes,
+        bool writeWaypoints, bool writeTracks, bool writeRoutes,
+        bool fileFormat, bool deviceFormat,
+        const QStringList &extensions,
+        QList<FormatOption> &inputOptions, 
+        QList<FormatOption> &outputptions, 
+         const QString &html):
+    name(name), description(description),
+    readWaypoints(readWaypoints), readTracks(readTracks), readRoutes(readRoutes),
+    writeWaypoints(writeWaypoints), writeTracks(writeTracks), writeRoutes(writeRoutes),
+    fileFormat(fileFormat), deviceFormat(deviceFormat),
+    extensions(extensions),
+    inputOptions(inputOptions),
+    outputOptions(outputptions),
+    html(QString())
+  {
+  }
+
+  Format(const Format &c):
+    name(c.name), description(c.description),
+    readWaypoints(c.readWaypoints), readTracks(c.readTracks), readRoutes(c.readRoutes),
+    writeWaypoints(c.writeWaypoints), writeTracks(c.writeTracks), writeRoutes(c.writeRoutes),
+    fileFormat(c.fileFormat), deviceFormat(c.deviceFormat),
+    extensions(c.extensions),
+    inputOptions(c.inputOptions),
+    outputOptions(c.outputOptions),
+    html(c.html)
+  {
+  }
+
+  ~Format() {};
+
+  bool isReadWaypoints() const { return readWaypoints; };
+  bool isReadTracks() const    { return readTracks; };
+  bool isReadRoutes() const    { return readRoutes; };
+  bool isReadSomething() const { 
+    return isReadWaypoints() || isReadTracks () || isReadRoutes(); 
+  };
+
+  bool isWriteWaypoints() const { return writeWaypoints; };
+  bool isWriteTracks() const    { return writeTracks; };
+  bool isWriteRoutes() const    { return writeRoutes; };
+  bool isWriteSomething() const { 
+    return isWriteWaypoints() || isWriteTracks () || isWriteRoutes(); 
+  };
+
+  QString getName() const           { return name; };
+  QString getDescription() const    { return description; };
+  QString getHtml() const           { return html; };
+  QStringList getExtensions() const { return extensions; };
+  const QList<FormatOption> &getInputOptions()  const { return inputOptions; };
+  const QList<FormatOption> &getOutputOptions() const { return outputOptions; };
+
+  QList<FormatOption> *getInputOptionsRef()  { return &inputOptions; };
+  QList<FormatOption> *getOutputOptionsRef() { return &outputOptions; };
+
+  bool isDeviceFormat() const { return deviceFormat; };
+  bool isFileFormat() const { return   fileFormat; };
+  
+  void saveSettings(QSettings &settings);
+  void restoreSettings(QSettings &settings);
+  void setToDefault();
+  static QString getHtmlBase() { return htmlBase; }
+  static void setHtmlBase(const QString &s) { htmlBase = s; }
+
+ private:
+  QString name, description;
+  bool readWaypoints, readTracks, readRoutes;
+  bool writeWaypoints, writeTracks, writeRoutes;
+  bool fileFormat, deviceFormat;
+  QStringList extensions;
+  QList<FormatOption>inputOptions;
+  QList<FormatOption>outputOptions;
+  QString html;
+  static QString htmlBase;
+  
+};
+
+#endif
index f9fc6562f5975e36fdf1b6bb31b27f610c483672..7caf39d836397cc227630e4876c14bed85983fac 100644 (file)
@@ -1,5 +1,5 @@
 // -*- c++ -*-
-// $Id: formatload.cpp,v 1.2 2009/08/28 17:08:55 robertl Exp $
+// $Id: formatload.cpp,v 1.3 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -51,6 +51,8 @@ bool FormatLoad::processFormat(Format &format)
     return false;
   }
   QString htmlPage = lines[currentLine++];
+  htmlPage.replace(QRegExp("^[\\s]*"), "");
+  htmlPage.replace(QRegExp("[\\s]$"), "");
 
   QRegExp regex("^option");
   QList <FormatOption> optionList;
@@ -108,7 +110,12 @@ bool FormatLoad::processFormat(Format &format)
                  hfields[0] == "serial",
                  QStringList() << hfields[3],
                  optionList,
-                 optionList2);
+                 optionList2, htmlPage);
+  if (htmlPage.length() > 0 && Format::getHtmlBase().length() == 0) {
+    QString base = htmlPage;
+    base.replace(QRegExp("/[^/]+$"), "/");
+    Format::setHtmlBase(base);
+  }
   return true;
 }
 
index b3ac386fa2fb8278f22c087a31f8a21860719aeb..0b06ed66068bba7972528a280b403efc0a8876ce 100755 (executable)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: gmapdlg.cpp,v 1.2 2009/08/28 17:08:55 robertl Exp $
+// $Id: gmapdlg.cpp,v 1.3 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -208,6 +208,9 @@ GMapDialog::GMapDialog(QWidget *parent, const QString &gpxFileName, QPlainTextEd
   connect(ui.treeView, SIGNAL(customContextMenuRequested(const QPoint &)),
          this, SLOT(showContextMenu(const QPoint &)));
 
+  connect(ui.copyButton, SIGNAL(clicked()), this, SLOT(copyButtonClickedX()));
+
+  ui.copyButton->hide(); // Hide for now, not working
 
 }
 
@@ -558,3 +561,7 @@ void GMapDialog::showContextMenu(const QPoint &pt)
   else {
   }
 }
+//------------------------------------------------------------------------
+void GMapDialog::copyButtonClickedX() {
+  
+}
index f4082c15ff65fe9601f5321674b249fd1e45fdbf..901ab4c38d8962447e34d9399892eef2a120d7f6 100755 (executable)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: gmapdlg.h,v 1.1 2009/07/05 21:14:56 robertl Exp $
+// $Id: gmapdlg.h,v 1.2 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -64,6 +64,7 @@ private slots:
   void routeClickedX(int i);
   void treeDoubleClicked(const QModelIndex &idx);
   void selectionChangedX (const QItemSelection &,  const QItemSelection &);
+  void copyButtonClickedX();
   void showContextMenu(const QPoint &);
 
 
index 8bd7a011f0e858c9cf5173be5bb5d6005cd8488d..f0e13e1ead84191b32298d7aba983f5cc8a568d3 100644 (file)
   <property name="windowTitle">
    <string>Dialog</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <widget class="QSplitter" name="splitter">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <widget class="QTreeView" name="treeView"/>
-     <widget class="QFrame" name="frame">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-        <horstretch>10</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="frameShape">
-       <enum>QFrame::StyledPanel</enum>
-      </property>
-      <property name="frameShadow">
-       <enum>QFrame::Raised</enum>
-      </property>
-     </widget>
-    </widget>
-   </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Close</set>
-     </property>
-    </widget>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <layout class="QVBoxLayout" name="verticalLayout_2">
+     <item>
+      <widget class="QSplitter" name="splitter">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <widget class="QWidget" name="">
+        <layout class="QVBoxLayout" name="verticalLayout">
+         <item>
+          <widget class="QTreeView" name="treeView"/>
+         </item>
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout">
+           <item>
+            <spacer name="horizontalSpacer">
+             <property name="orientation">
+              <enum>Qt::Horizontal</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>40</width>
+               <height>20</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+           <item>
+            <widget class="QPushButton" name="copyButton">
+             <property name="toolTip">
+              <string>Copy to Clipboard</string>
+             </property>
+             <property name="text">
+              <string>Copy</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <spacer name="horizontalSpacer_2">
+             <property name="orientation">
+              <enum>Qt::Horizontal</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>40</width>
+               <height>20</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </widget>
+       <widget class="QFrame" name="frame">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+          <horstretch>10</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="minimumSize">
+         <size>
+          <width>20</width>
+          <height>20</height>
+         </size>
+        </property>
+        <property name="frameShape">
+         <enum>QFrame::StyledPanel</enum>
+        </property>
+        <property name="frameShadow">
+         <enum>QFrame::Raised</enum>
+        </property>
+       </widget>
+      </widget>
+     </item>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Close</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
    </item>
   </layout>
  </widget>
index da1b7989d08a8a4119cb2c9fe456d2d17594646a..7abaf001b1bbd1b83d1cb1aaed3a8a6f426713df 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: help.cpp,v 1.7 2009/09/14 14:25:14 robertl Exp $
+// $Id: help.cpp,v 1.8 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
 //  USA
 //
 //------------------------------------------------------------------------
-#include "help.h"
-#include <QApplication>
 #include <QUrl>
-#include <QWebView>
 #include <QDesktopServices>
 
+#include "help.h"
+#include "format.h"
+
 //------------------------------------------------------------------------
-void ShowHelp(const char *name)
+void ShowHelp(const QString &urlIn)
+
 {
-  QString urlname("file:///" + QApplication::applicationDirPath() +
-                 "/help/" + name);
-#ifdef XXXX
-  // This has window modality problems.  Unless the problem is solved, just use
-  // the native browser.
-  QWebView *view = new QWebView();
-  view->setWindowTitle("GPSBabel Help");
-  view->load(urlname);
-  view->show();
-#else
-  QDesktopServices::openUrl(QUrl(urlname));
-#endif
+  QString url = urlIn;
+  if (!url.contains(QRegExp("^http://"))) {
+    url = Format::getHtmlBase() + url;
+  }
+  QDesktopServices::openUrl(QUrl(url));
 }
+
+
+
index edbbfeaf57db61499e78b859891696f5e6a97f47..9cc3896ff565d1d47f333f1b143f661aa2eeec26 100644 (file)
@@ -1,30 +1,30 @@
-// -*- C++ -*-\r
-// $Id: help.h,v 1.3 2009/09/14 14:25:14 robertl Exp $\r
-//------------------------------------------------------------------------\r
-//\r
-//  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.\r
-//\r
-//  This program is free software; you can redistribute it and/or\r
-//  modify it under the terms of the GNU General Public License as\r
-//  published by the Free Software Foundation; either version 2 of the\r
-//  License, or (at your option) any later version.\r
-//\r
-//  This program is distributed in the hope that it will be useful,\r
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
-//  General Public License for more details.\r
-//\r
-//  You should have received a copy of the GNU General Public License\r
-//  along with this program; if not, write to the Free Software\r
-//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111\r
-//  USA\r
-//\r
-\r
-#ifndef HELP_H\r
-#define HELP_H\r
-#include <QString>\r
-\r
-extern void ShowHelp(const char *name);\r
-\r
-\r
-#endif\r
+// -*- C++ -*-
+// $Id: help.h,v 1.4 2009/11/02 20:38:02 robertl Exp $
+//------------------------------------------------------------------------
+//
+//  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
+//
+//  This program is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU General Public License as
+//  published by the Free Software Foundation; either version 2 of the
+//  License, or (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111
+//  USA
+//
+
+#ifndef HELP_H
+#define HELP_H
+#include <QString>
+
+extern void ShowHelp(const QString & name);
+
+
+#endif
index c5b06ffa06675a1dcaa1408ece12fb9c07846df8..914ce3f36cbe39501660666e28945c265b17b653 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: mainwindow.cpp,v 1.11 2009/09/15 18:04:03 robertl Exp $
+// $Id: mainwindow.cpp,v 1.12 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -359,8 +359,7 @@ int MainWindow::currentComboFormatIndex(QComboBox *comboBox)
 {
   int idx = comboBox->currentIndex();
   if (idx<0 || idx >= comboBox->count()) {
-    QMessageBox::critical(0, appName,
-                        "*** Internal Error -- current combo index is invalid!");
+    //    QMessageBox::critical(0, appName, "*** Internal Error -- current combo index is invalid!");
     return 0;
   }
   return comboBox->itemData(idx).toInt();
@@ -623,7 +622,8 @@ void MainWindow::inputOptionButtonClicked()
   else {
     OptionsDlg optionDlg(0,
                         formatList[fidx].getName(),
-                        formatList[fidx].getInputOptionsRef());
+                        formatList[fidx].getInputOptionsRef(),
+                        formatList[fidx].getHtml());
     optionDlg.setWindowTitle(QString(appName) + " - " + tr("Options for %1").arg(formatList[fidx].getName()));
     optionDlg.exec();
     displayOptionsText(ui.inputOptionsText,  ui.inputFormatCombo, true);
@@ -640,7 +640,10 @@ void MainWindow::outputOptionButtonClicked()
        tr("There are no output options for format \"%1\"").arg(formatList[fidx].getDescription()));
   }
   else {
-    OptionsDlg optionDlg(0, formatList[fidx].getName(), formatList[fidx].getOutputOptionsRef());
+    OptionsDlg optionDlg(0, 
+                        formatList[fidx].getName(), 
+                        formatList[fidx].getOutputOptionsRef(),
+                        formatList[fidx].getHtml());
     optionDlg.setWindowTitle(QString(appName) + " - " + tr("Options for %1").arg(formatList[fidx].getName()));
     optionDlg.exec();
     displayOptionsText(ui.outputOptionsText,  ui.outputFormatCombo, false);
@@ -927,7 +930,7 @@ void MainWindow::resetFormatDefaults()
 void MainWindow::moreOptionButtonClicked()
 {
   AdvDlg advDlg(0, bd.synthShortNames,
-               bd.forceGPSTypes, bd.enableCharSetXform, bd.previewGmap, bd.debugLevel);
+               bd.enableCharSetXform, bd.previewGmap, bd.debugLevel);
   connect(advDlg.formatButton(), SIGNAL(clicked()),
          this, SLOT(resetFormatDefaults()));
   advDlg.exec();
index 565081efb0f70ed30ddbf8f68f5d97a2d850340e..996fc464194bb85d058f384efc037a8a8ed47416 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>297</width>
-    <height>107</height>
+    <width>303</width>
+    <height>175</height>
    </rect>
   </property>
   <property name="windowTitle">
      </property>
     </widget>
    </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Nuke (Remove) Data Types</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <property name="topMargin">
+       <number>4</number>
+      </property>
+      <property name="bottomMargin">
+       <number>4</number>
+      </property>
+      <item>
+       <widget class="QCheckBox" name="nukeRoutes">
+        <property name="text">
+         <string>Routes</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="nukeTracks">
+        <property name="text">
+         <string>Tracks</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="nukeWaypoints">
+        <property name="text">
+         <string>Waypoints</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
index cd4634ab64922a7de855e4ed7a8ffaba343cbb7e..277e00ac441695478c6db77bce508a62602009be 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: optionsdlg.cpp,v 1.3 2009/09/08 16:06:32 robertl Exp $
+// $Id: optionsdlg.cpp,v 1.4 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -81,10 +81,12 @@ void FileDlgManager::buttonClicked()
 }
 
 //------------------------------------------------------------------------
-OptionsDlg::OptionsDlg(QWidget*parent,  const QString &fmtName, QList<FormatOption> *opts):
+OptionsDlg::OptionsDlg(QWidget*parent,  const QString &fmtName, QList<FormatOption> *opts,
+                      const QString &html):
   QDialog(parent),
   fmtName(fmtName),
-  options(*opts)
+  options(*opts),
+  html(html)
 {
 
   QVBoxLayout *verticalLayout = new QVBoxLayout(this);
@@ -95,6 +97,7 @@ OptionsDlg::OptionsDlg(QWidget*parent,  const QString &fmtName, QList<FormatOpti
     checkBox->setText(tr(options[k].getDescription().toAscii().data()));
     horizontalLayout->addWidget(checkBox);
     checkBox->setChecked(options[k].getSelected());
+    //checkBox->setWhatsThis(options[k].getHtml());
 
     QSpacerItem *horizontalSpacer = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
     horizontalLayout->addItem(horizontalSpacer);
@@ -234,6 +237,5 @@ void OptionsDlg::rejectClicked()
 //------------------------------------------------------------------------
 void OptionsDlg::helpClicked()
 {
-  QString str = "fmt_" + fmtName + ".html";
-  ShowHelp(str.toStdString().c_str());
+  ShowHelp(html);
 }
index bced79b9871558c4fee7fe5428eac6c9663c46bb..ba3b03130b7060bb17d996a338b344bd4ab3e3dc 100644 (file)
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-// $Id: optionsdlg.h,v 1.1 2009/07/05 21:14:56 robertl Exp $
+// $Id: optionsdlg.h,v 1.2 2009/11/02 20:38:02 robertl Exp $
 //------------------------------------------------------------------------
 //
 //  Copyright (C) 2009  S. Khai Mong <khai@mangrai.com>.
@@ -55,7 +55,8 @@ private slots:
 class OptionsDlg: public QDialog {
 Q_OBJECT
  public:
-  OptionsDlg(QWidget *parent, const QString &fmtName, QList<FormatOption> *options);
+  OptionsDlg(QWidget *parent, const QString &fmtName, QList<FormatOption> *options,
+            const QString &html);
   
  private:
   QString fmtName;
@@ -63,6 +64,7 @@ Q_OBJECT
   QDialogButtonBox *buttonBox;
   QList<QCheckBox*> checkBoxes;
   QList<QWidget*> fields;
+  QString html;
 
  private slots:
   void acceptClicked();
index 45991b1312e39e866233df64b5c8b42d601aae1e..a0366579c808d17df8ab66babcf85e71e08698de 100755 (executable)
@@ -1,4 +1,4 @@
-; $Id: setup.iss,v 1.10 2009/10/12 13:23:51 robertl Exp $\r
+; $Id: setup.iss,v 1.11 2009/11/02 20:38:02 robertl Exp $\r
 ;\r
 ; NOTE: setup.iss is generated from setup.iss.in via autoconf.\r
 ; The generated setup.iss is checked in to help keep the version numbers\r
@@ -17,7 +17,7 @@
 ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)\r
 AppId={{1B8FE958-A304-4902-BF7A-4E2F0F5B7017}\r
 AppName=GPSBabel\r
-AppVerName=GPSBabel 1.3.7-beta20090906\r
+AppVerName=GPSBabel 1.3.7-beta20091003\r
 AppPublisher=GPSBabel\r
 AppPublisherURL=http://www.gpsbabel.org\r
 AppSupportURL=http://www.gpsbabel.org\r
@@ -25,7 +25,7 @@ AppUpdatesURL=http://www.gpsbabel.org
 DefaultDirName={pf}\GPSBabel\r
 DefaultGroupName=GPSBabel\r
 OutputDir=release\r
-OutputBaseFilename=GPSBabel-1.3.7-beta20090906-Setup\r
+OutputBaseFilename=GPSBabel-1.3.7-beta20091003-Setup\r
 SetupIconFile=images\babel2.ico\r
 Compression=lzma\r
 SolidCompression=yes\r
index 91bf9ef881e9581681fb1263d797a934fa4be8d1..9e42c93bfb5aed97649339b80eca2efec23f9a5e 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>544</width>
-    <height>219</height>
+    <width>663</width>
+    <height>248</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -51,7 +51,7 @@ If this value contains a percent (%) character, it is treated as a format string
        </property>
       </widget>
      </item>
-     <item row="1" column="1" colspan="3">
+     <item row="1" column="1" colspan="4">
       <widget class="QLineEdit" name="titleText">
        <property name="toolTip">
         <string>the title of the new track is composed of the start time of the track appended to this value. </string>
@@ -86,7 +86,7 @@ This option changes the time of all trackpoints. This might be useful if your tr
        </item>
       </layout>
      </item>
-     <item row="2" column="2">
+     <item row="2" column="3">
       <layout class="QHBoxLayout" name="horizontalLayout_4">
        <item>
         <widget class="QSpinBox" name="hoursSpin"/>
@@ -100,7 +100,7 @@ This option changes the time of all trackpoints. This might be useful if your tr
        </item>
       </layout>
      </item>
-     <item row="2" column="3">
+     <item row="2" column="4">
       <layout class="QHBoxLayout" name="horizontalLayout_2">
        <item>
         <widget class="QSpinBox" name="minsSpin"/>
@@ -114,7 +114,7 @@ This option changes the time of all trackpoints. This might be useful if your tr
        </item>
       </layout>
      </item>
-     <item row="2" column="4">
+     <item row="2" column="5">
       <layout class="QHBoxLayout" name="horizontalLayout">
        <item>
         <widget class="QSpinBox" name="secsSpin"/>
@@ -229,25 +229,24 @@ This option puts all track points from all tracks into a single track and sorts
        </property>
       </widget>
      </item>
-     <item row="5" column="2">
-      <widget class="QCheckBox" name="splitCheck">
-       <property name="toolTip">
-        <string>Split tracks. </string>
-       </property>
-       <property name="whatsThis">
-        <string>Split by date or time interval 
-
-The input track will be split into several tracks depending on date of track points. If there is more than one track, use the pack option before before using this. 
-
-If the input has multiple tracks, pack them together before splitting them back apart per day.
-</string>
+     <item row="6" column="0" colspan="2">
+      <widget class="QRadioButton" name="splitDateCheck">
+       <property name="text">
+        <string>Split by Date</string>
        </property>
+      </widget>
+     </item>
+     <item row="6" column="2">
+      <widget class="QRadioButton" name="splitTimeCheck">
        <property name="text">
-        <string>Split</string>
+        <string>Split by Time</string>
+       </property>
+       <property name="autoExclusive">
+        <bool>false</bool>
        </property>
       </widget>
      </item>
-     <item row="5" column="3">
+     <item row="6" column="3">
       <layout class="QHBoxLayout" name="horizontalLayout_6">
        <item>
         <widget class="QSpinBox" name="splitTimeSpin">
@@ -280,7 +279,17 @@ If the input has multiple tracks, pack them together before splitting them back
        </item>
       </layout>
      </item>
-     <item row="5" column="4">
+     <item row="6" column="4">
+      <widget class="QRadioButton" name="splitDistanceCheck">
+       <property name="text">
+        <string>Split by Dist.</string>
+       </property>
+       <property name="autoExclusive">
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="5">
       <layout class="QHBoxLayout" name="horizontalLayout_7">
        <item>
         <widget class="QSpinBox" name="splitDistSpin">
@@ -318,70 +327,66 @@ If the input has multiple tracks, pack them together before splitting them back
        </item>
       </layout>
      </item>
-     <item row="6" column="0" colspan="2">
-      <widget class="QWidget" name="widget_5" native="true">
-       <property name="toolTip">
-        <string>Synthesize GPS Fixes. </string>
-       </property>
-       <property name="whatsThis">
-        <string>Synthesize GPS fixes (PPS, DGPS, 3D, 2D, NONE).
-
-This option sets the GPS fix status for all trackpoints to the specified value. Valid values for this option are PPS, DGPS, 3D, 2D, or NONE.
-
-This option is most useful when converting from a format that doesn't contain GPS fix status to one that requires it. </string>
-       </property>
-       <layout class="QHBoxLayout" name="horizontalLayout_3">
-        <property name="margin">
-         <number>0</number>
-        </property>
-        <item>
-         <widget class="QCheckBox" name="GPSFixesCheck">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
+     <item row="7" column="0" colspan="2">
+      <layout class="QHBoxLayout" name="horizontalLayout_8">
+       <item>
+        <widget class="QCheckBox" name="GPSFixesCheck">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string>GPS Fixes</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QComboBox" name="GPSFixesCombo">
+         <item>
+          <property name="text">
+           <string>none</string>
           </property>
+         </item>
+         <item>
           <property name="text">
-           <string>GPS Fixes</string>
+           <string>pps</string>
           </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QComboBox" name="GPSFixesCombo">
-          <item>
-           <property name="text">
-            <string>none</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>pps</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>dgps</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>3d</string>
-           </property>
-          </item>
-          <item>
-           <property name="text">
-            <string>2d</string>
-           </property>
-          </item>
-         </widget>
-        </item>
-       </layout>
-       <zorder>GPSFixesCombo</zorder>
-       <zorder>GPSFixesCheck</zorder>
-      </widget>
+         </item>
+         <item>
+          <property name="text">
+           <string>dgps</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>3d</string>
+          </property>
+         </item>
+         <item>
+          <property name="text">
+           <string>2d</string>
+          </property>
+         </item>
+        </widget>
+       </item>
+       <item>
+        <spacer name="horizontalSpacer_2">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>2</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
      </item>
-     <item row="6" column="3">
+     <item row="7" column="4">
       <widget class="QCheckBox" name="speedCheck">
        <property name="toolTip">
         <string>Synthesize speed. </string>
@@ -396,7 +401,7 @@ This option computes a value for the GPS speed at each trackpoint. This is most
        </property>
       </widget>
      </item>
-     <item row="6" column="4">
+     <item row="7" column="5">
       <widget class="QCheckBox" name="courseCheck">
        <property name="toolTip">
         <string>Synthesize course.</string>